package ru.nnstu.medialib.service;

import java.util.List;

import ru.nnstu.medialib.dao.AuthorDAO;
import ru.nnstu.medialib.dao.AuthorDAOImpl;
import ru.nnstu.medialib.domain.Author;

public class AuthorServiceImpl implements AuthorService {
	
	AuthorDAO authorDAO;
	
	public AuthorServiceImpl() {
		super();
		authorDAO = new AuthorDAOImpl();
	}

	@Override
	public void addAuthor(Author author) {
		authorDAO.saveAuthor(author);
	}

	@Override
	public List<Author> listAuthor() {
		return authorDAO.listAuthor();
	}

	@Override
	public void removeAuthor(Long id) {
		authorDAO.removeAuthor(id);
	}

}
